//
//  OperationBillGoodListHeadView.m
//  LogisticsSupplier
//
//  Created by 吕晶 on 2020/11/10.
//  Copyright © 2020 吕晶. All rights reserved.
//

#import "OperationBillGoodListHeadView.h"

@implementation OperationBillGoodListHeadView

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = HexColor(0xF7F7FA);
        CGFloat labW = ScreenW * 0.25;
        CGFloat labH = 40;
        UIColor *col = HexColor(0x585974);
        UIFont *fon = [UIFont systemFontOfSize:14];
        UILabel *titleLab1 = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, labW, labH)];
        titleLab1.textColor = col;
        titleLab1.font = fon;
        titleLab1.textAlignment = NSTextAlignmentCenter;
        titleLab1.text = @"运单号";
        [self addSubview:titleLab1];
        
//        UILabel *line1 = [[UILabel alloc] initWithFrame:CGRectMake(titleLab1.nim_right - 0.25, titleLab1.nim_top, 0.5, labH)];
//        line1.backgroundColor = HexColorA(0x000000, 0.4);
//        [self addSubview:line1];
        
        UILabel *titleLab2 = [[UILabel alloc] initWithFrame:CGRectMake(titleLab1.nim_right, titleLab1.nim_top, labW, labH)];
        titleLab2.textColor = col;
        titleLab2.font = fon;
        titleLab2.textAlignment = NSTextAlignmentCenter;
        titleLab2.text = @"货物名称";
        [self addSubview:titleLab2];
        
//        UILabel *line2 = [[UILabel alloc] initWithFrame:CGRectMake(titleLab2.nim_right - 0.25, titleLab2.nim_top, 0.5, labH)];
//        line2.backgroundColor = HexColorA(0x000000, 0.4);
//        [self addSubview:line2];
        
        UILabel *titleLab3 = [[UILabel alloc] initWithFrame:CGRectMake(titleLab2.nim_right, titleLab2.nim_top, labW, labH)];
        titleLab3.textColor = col;
        titleLab3.font = fon;
        titleLab3.textAlignment = NSTextAlignmentCenter;
        titleLab3.text = @"货物型号";
        [self addSubview:titleLab3];
        
//        UILabel *line3 = [[UILabel alloc] initWithFrame:CGRectMake(titleLab3.nim_right - 0.25, titleLab3.nim_top, 0.5, labH)];
//        line3.backgroundColor = HexColorA(0x000000, 0.4);
//        [self addSubview:line3];
        
        UILabel *titleLab4 = [[UILabel alloc] initWithFrame:CGRectMake(titleLab3.nim_right, titleLab3.nim_top, labW, labH)];
        titleLab4.textColor = col;
        titleLab4.font = fon;
        titleLab4.textAlignment = NSTextAlignmentCenter;
        titleLab4.text = @"包装类型";
        [self addSubview:titleLab4];
        
//        UILabel *line4 = [[UILabel alloc] initWithFrame:CGRectMake(titleLab4.nim_right - 0.25, titleLab4.nim_top, 0.5, labH)];
//        line4.backgroundColor = HexColorA(0x000000, 0.4);
//        [self addSubview:line4];
        
        UILabel *titleLab5 = [[UILabel alloc] initWithFrame:CGRectMake(titleLab4.nim_right, titleLab4.nim_top, labW, labH)];
        titleLab5.textColor = col;
        titleLab5.font = fon;
        titleLab5.textAlignment = NSTextAlignmentCenter;
        titleLab5.text = @"收容数";
        [self addSubview:titleLab5];
        
//        UILabel *line5 = [[UILabel alloc] initWithFrame:CGRectMake(titleLab5.nim_right - 0.25, titleLab5.nim_top, 0.5, labH)];
//        line5.backgroundColor = HexColorA(0x000000, 0.4);
//        [self addSubview:line5];
        
        UILabel *titleLab6 = [[UILabel alloc] initWithFrame:CGRectMake(titleLab5.nim_right, titleLab5.nim_top, labW, labH)];
        titleLab6.textColor = col;
        titleLab6.font = fon;
        titleLab6.textAlignment = NSTextAlignmentCenter;
        titleLab6.text = @"重量(kg)/个";
        [self addSubview:titleLab6];
        
//        UILabel *line = [[UILabel alloc] initWithFrame:CGRectMake(0, titleLab1.nim_bottom, ScreenW, 0.5)];
//        line.backgroundColor = HexColorA(0x000000, 0.4);
//        [self addSubview:line];
        
        UILabel *titleLab7 = [[UILabel alloc] initWithFrame:CGRectMake(titleLab6.nim_right, titleLab6.nim_top, labW, labH)];
        titleLab7.textColor = col;
        titleLab7.font = fon;
        titleLab7.textAlignment = NSTextAlignmentCenter;
        titleLab7.text = @"体积(m³)/个";
        [self addSubview:titleLab7];
        
        UILabel *titleLab8 = [[UILabel alloc] initWithFrame:CGRectMake(titleLab7.nim_right, titleLab7.nim_top, labW, labH)];
        titleLab8.textColor = col;
        titleLab8.font = fon;
        titleLab8.textAlignment = NSTextAlignmentCenter;
        titleLab8.text = @"件数";
        [self addSubview:titleLab8];
        
        UILabel *titleLab9 = [[UILabel alloc] initWithFrame:CGRectMake(titleLab8.nim_right, titleLab8.nim_top, labW, labH)];
        titleLab9.textColor = col;
        titleLab9.font = fon;
        titleLab9.textAlignment = NSTextAlignmentCenter;
        titleLab9.text = @"货物数量";
        [self addSubview:titleLab9];
        
        UILabel *titleLab10 = [[UILabel alloc] initWithFrame:CGRectMake(titleLab9.nim_right, titleLab9.nim_top, labW, labH)];
        titleLab10.textColor = col;
        titleLab10.font = fon;
        titleLab10.textAlignment = NSTextAlignmentCenter;
        titleLab10.text = @"货物描述";
        [self addSubview:titleLab10];
        
        UILabel *titleLab11 = [[UILabel alloc] initWithFrame:CGRectMake(titleLab10.nim_right, titleLab10.nim_top, labW, labH)];
        titleLab11.textColor = col;
        titleLab11.font = fon;
        titleLab11.textAlignment = NSTextAlignmentCenter;
        titleLab11.text = @"生产批次号";
        [self addSubview:titleLab11];
        
        self.height = 40;
    }
    return self;
}

@end
